<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>amCharts Example</title>
    </head>
    
    <body style="background-color:#EEEEEE">
        <!-- This script will display JavaScript charts if browser supports SVG, and only if it doesn't will display Flash version. -->
        <!-- saved from url=(0013)about:internet -->
        <!-- amcharts script-->
        <!-- swf object (version 2.2) is used to detect if flash is installed and include swf in the page -->
        <script type="text/javascript" src="../../amcharts/flash/swfobject.js"></script>
        
        <!-- following scripts required for JavaScript version. The order is important! -->
        <script type="text/javascript" src="../../amcharts/javascript/amcharts.js"></script>
        <script type="text/javascript" src="../../amcharts/javascript/amfallback.js"></script>
        <script type="text/javascript" src="../../amcharts/javascript/raphael.js"></script>
        
        <!-- chart is placed in this div. if you have more than one chart on a page, give unique id for each div -->
        <div id="chartdiv" style="width:600px; height:400px; background-color:#FFFFFF"></div>
        
        <script type="text/javascript">
        
            var params = 
            {
                bgcolor:"#FFFFFF"
            };
            
            var flashVars = 
            {
                path: "../../amcharts/flash/",
            
                /* in most cases settings and data are loaded from files, but, as this require
                 all the files to be upladed to web server, we use inline data and settings here.*/
                 
                // settings_file: "../sampleData/column_settings.xml",
                // data_file: "../sampleData/column_data.xml"
                
                chart_data: "<chart><axes><axis xid='0'>Sales</axis><axis xid='1'>Development</axis><axis xid='2'>Marketing</axis><axis xid='3'>Customer Support</axis><axis xid='4'>Administration</axis><axis xid='5'>Information technology</axis></axes><graphs><graph gid='1'><value xid='0'>20</value><value xid='1'>15</value><value xid='2'>12</value><value xid='3'>18</value><value xid='4'>11</value><value xid='5'>19</value></graph><graph gid='2'><value xid='0'>18</value><value xid='1'>13</value><value xid='2'>16</value><value xid='3'>15</value><value xid='4'>5</value><value xid='5'>13</value></graph></graphs></chart>",
                chart_settings: "<settings><grid><approx_count>5</approx_count></grid><values><skip_last>1</skip_last><min>0</min><unit>$</unit><unit_position>left</unit_position></values><balloon><show>{title}: ${value} mln.</show></balloon><legend><align>center</align></legend><radar><grow_time>2</grow_time><sequenced_grow>1</sequenced_grow></radar><graphs><graph gid='1'><title>Actual spending</title><color>FFCC00</color><line_width>2</line_width><bullet>round</bullet></graph><graph gid='2'><title>Alocated budget</title><color>999999</color><line_width>2</line_width><bullet>round</bullet></graph></graphs><fills><fill fid='0'><start_value>20</start_value><end_value>25</end_value><color>CC3333</color><alpha>90</alpha></fill><fill fid='1'><start_value>0</start_value><end_value>5</end_value><color>0066CC</color><alpha>90</alpha></fill></fills></settings>"
            };
            
            window.onload = function()
            {            
                // change == to != to test flash version
                if(AmCharts.recommended() == "js")
                {
                    var amFallback = new AmCharts.AmFallback();
                    // amFallback.settingsFile = flashVars.settings_file;  		// doesn't support multiple settings files or additional_chart_settins as flash does
                    // amFallback.dataFile = flashVars.data_file;
                    amFallback.chartSettings = flashVars.chart_settings;
                    amFallback.chartData = flashVars.chart_data;
                    amFallback.type = "radar";
                    amFallback.write("chartdiv");
                }
                else
                {
                    swfobject.embedSWF("../../amcharts/flash/amradar.swf", "chartdiv", "600", "400", "8.0.0", "../../amcharts/flash/expressInstall.swf", flashVars, params);
                }
            }
        
        </script>
        
        <!-- end of amcharts script -->
        
        <!-- other parameters which can be passed with flashVars to swf:
        
            chart_data - data in csv or xml format;
            chart_settings - settings in xml format;
            additional_chart_settings - settings in xml format which will be appended to chart_settings or settings loaded from a file;
            loading_settings - string displayed while loading settings;
            loading_data - string displayed while loading data;
            preloader_color - hex color (#CC0000 for example) of a preloader bar;
            error_loading_file - string displayed if indicated file was not found.
         -->
    
    </body>
</html>
